package com.wfs.spring.thread.Thread;



/**
 * @Auther: wfs
 * @Date: 2019/6/13 20:05
 * @Description:
 */
public class MyThread2 extends Thread {
    private Object look;
    public MyThread2(Object look){
        this.look=look;
    }

    @Override
    public void run() {
        try {
            synchronized (look){
                System.out.println("开始 notify time="+System.currentTimeMillis());
                look.notify();
                System.out.println("结束 notify time="+System.currentTimeMillis());
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
